//
//  Tool.h
//
//
//  Created by lpc on 13-7-4.
//  Copyright (c) 2013年 mac. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

@interface LPCTool : NSObject
// 获取系统版本号
+ (NSString *)getOSVersion;

+ (NSString *)getUserAgent;

+ (UIColor *)getBackgroundColor;

+ (UIColor *)getCellBackgroundColor;

+ (int)getCurYear;
+ (int)getCurMonth;

+ (NSString *)getCurDateString;
+ (NSString *)getDateString:(long long)time;
+ (NSString *)getCurMonDayString;
+ (NSString *)getDateTimeSecString:(long long)time;
+ (NSString *)getDateTimeString:(long long)time;
+ (NSString *)getChatDateTimeString:(long long)time;
+ (NSString *)getUrlDateTimeString:(NSString *)timeStr;
+ (NSString *)getCurDateTimeString:(NSDateFormatter *)formatter;
+ (NSString *)getDateTimeString:(NSDate *)date formatter:(NSDateFormatter *)formatter;
+ (long long)getTimeLongLong:(NSString *)timeStr;
+ (NSString *)weekdayStringFromDate:(NSDate *)inputDate;
+ (BOOL)isDigitString:(NSString *)str;

+ (UIColor *)colorWithHexString:(NSString *)color;

+ (BOOL)isNetworkRunning;

+ (BOOL)isDigitCharacterString:(NSString *)str;

+ (NSString *)fetchSSIDInfo;

+ (long long)getMessageId;

+ (long long)ntohll:(long long)llValue;

+ (UIImage *)OriginImage:(UIImage *)image scaleToSize:(CGSize)size;

+ (void)shakeAndPlaySound:(BOOL)isNoSound:(BOOL)isShake;

+ (UIImage *)scale:(UIImage *)sourceImg toSize:(CGSize)size;

+ (CGSize)scaleSize:(CGSize)sourceSize;

+ (void)putImage:(NSData *)imageData withName:(NSString *)path;

+ (NSString *)getFilePathName:(NSString *)imageName;

+ (NSString *)getTradeNo:(NSString *)result;

// 创建图片，指定颜色和大小
+ (UIImage *)imageWithColor:(UIColor *)color andSize:(CGSize)size;
// ios去掉字符串中的html标签
+ (NSString *)filterHTML:(NSString *)html;

+ (NSString *)getFormattedString:(float)value decimalNum:(int)decimalNum default:(NSString *)defaultStr;
+ (NSString *)getFormattedPercentString:(float)value decimalNum:(int)decimalNum default:(NSString *)defaultStr;

@end
